<?php

namespace App\Http\Controllers;


class ReviewCard extends Base
{

    public function logic()
    {
        if (isset($this->param['item'])) {
            $item = $this->param['item'];
        } else {
            return $this->returnError(1, "请输入物品ID");
        }
        if (isset($this->param['code'])) {
            $code = $this->param['code'];
        } else {
           return $this->returnError(2, "请输入物品校验码");
        }
        $item_id   = $this->check_card_info($item, $code);
        $item_info = $this->get_item_info($item_id);
        if ($item_info == false) {
            echo '这个物品不存在';
            return;
        }
        $describe = '这个物品是：' . $item_info['name'] . ' 详细描述：' . $item_info['desc'];
        echo $describe;
    }

}
